package com.example.accessibilityhelper.addfriend

import android.accessibilityservice.AccessibilityService
import android.view.accessibility.AccessibilityEvent
import com.example.accessibilityhelper.Step
import com.example.accessibilityhelper.WeChatHelperService

/**
 * 第二步，点击添加好友 item
 */
class AddFriendFromMainPageStep2: Step() {

    override fun match(service: AccessibilityService, event: AccessibilityEvent): Boolean {
        return event.eventType == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED
                && event.className == WeChatHelperService.PAGE.MAIN_PAGE
    }

    override fun execute(service: AccessibilityService, event: AccessibilityEvent) {
        service
    }

}